package com.linkhub.oms.admin.modules.weighing.controller;

import com.linkhub.oms.admin.modules.weighing.domain.param.WeighingPackageInfoParam;
import com.linkhub.oms.admin.modules.weighing.domain.param.WeighingPackagePicParam;
import com.linkhub.oms.admin.modules.weighing.domain.vo.WeighingPackageInfoResponse;
import com.linkhub.oms.admin.modules.weighing.domain.vo.WeighingPackagePicResponse;
import com.linkhub.oms.admin.modules.weighing.service.WeighingPackageInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @author Jaycle
 * @version 1.0.0
 * @Description WeighingMachineController.java
 * @createTime 2024/10/02 20:54
 */
@Slf4j
@RestController
@Api(tags = {"称重机器接口"})
@RequestMapping("/weighing")
public class WeighingMachineController {

    @Resource
    private WeighingPackageInfoService weighingPackageInfoService;

    @PostMapping("/weighing_package_info")
    @ApiOperation(value = "称重机器包裹信息接口")
    public WeighingPackageInfoResponse weighingPackageInfo( @Valid @RequestBody WeighingPackageInfoParam weighingPackageInfoParam ) {
        return weighingPackageInfoService.weighingPackageInfo(weighingPackageInfoParam);
    }

    @PostMapping("/weighing_package_pic")
    @ApiOperation(value = "称重机器包裹图片接口")
    public WeighingPackagePicResponse weighingPackagePic( @Valid @RequestBody WeighingPackagePicParam weighingPackagePicParam ) {
        return weighingPackageInfoService.weighingPackagePic(weighingPackagePicParam);
    }

}
